<?php 
if(!defined('ADMIN')){
	exit('Access Denied');
}
?>
<script>
$(function(){
    $('#node_id').change(function(){
	    var node = $(this).val();
		$('#node').val(node);
	});
	$('#mod_id').change(function(){
	    var node = $(this).find("option:selected").text();
		$('#mod').val(node);
	});
	$('#act_id').change(function(){
	    var node = $(this).find("option:selected").text();
		$('#act').val(node);
	});
})
</script>
<div class="pageContent">
<form action="index.php?mod=<?=MOD?>&act=<?=ACT?>" method="post"  class="pageForm required-validate"  name="form1" onsubmit="return validateCallback(this, dialogAjaxDone);">
<input type="hidden" name="id" value="<?=$row['id']?>" />
<input type="hidden" name="sub" value="save" />
<div class="pageFormContent" layoutH="50">
<p><label>食材名称：</label>
<input name="title" type="text" size="20"  id="title" value="<?=$row['title']?>" class="required" /></p>
<p><label>食材类型：</label>
<?=select($mtypearr,$row['mtype'],'mtype')?>&nbsp;<span>必选</span></p>

<p><label>食材分类：</label>
<?=select($metcatlist,$row['metcatid'],'metcatid')?>&nbsp;<span>必选</span></p>

<p><label>损耗率：</label>
<input name="lostlv" type="text" size="20"  id="lostlv" value="<?=$row['lostlv']?$row['lostlv']:'0'?>"  class="required"  />%&nbsp;<span>保留2位小数，如5.65%</span></p>
<p><label>参考价格：</label>
<input name="price" type="text" size="20"  id="price" value="<?=$row['price']?>" />元&nbsp;<span>保留2位小数，如2.55元</span></p>
<p><label>排序：</label>
<input name="listorder" type="text" id="sort" size="20" value="<?=$row['listorder']?$row['listorder']:$row['listorder']?>" />&nbsp;<span>越大越靠前</span></p>
</div>
		<div class="formBar">
			<ul>
				<!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
</form>
</div>
